import request from '@/utils/request'

// 创建随手拍
export function createReporting(data) {
  return request({
    url: '/system/reporting/create',
    method: 'post',
    data: data
  })
}

// 更新随手拍
export function updateReporting(data) {
  return request({
    url: '/system/reporting/update',
    method: 'put',
    data: data
  }) 
}

// 删除随手拍
export function deleteReporting(id) {
  return request({
    url: '/system/reporting/delete?id=' + id,
    method: 'delete'
  })
}

// 获得随手拍
export function getReporting(id) {
  return request({
    url: '/system/reporting/get?id=' + id,
    method: 'get'
  })
}

// 获得随手拍分页
export function getReportingPage(params) {
  return request({
    url: '/system/reporting/page',
    method: 'get',
    params
  })
}
// 导出随手拍 Excel
export function exportReportingExcel(params) {
  return request({
    url: '/system/reporting/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}

// ==================== 子表（随手拍-图片） ====================
      // 获得随手拍-图片列表
    export function getReportingPicListByReportingId(reportingId) {
      return request({
        url: '/system/reporting/reporting-pic/list-by-reporting-id?reportingId=' + reportingId,
        method: 'get'
      })
    }
	
	
	export function getIntegralSort(params) {
	  return request({
	    url: '/system/points-rule/list',
	    method: 'get',
		params
	  })
	}
	export function getIntegralSortView(params) {
	  return request({
	    url: '/system/points-rule/listView',
	    method: 'get',
		params
	  })
	}
	
  